<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<?=View::factory("car2club/menu_head")?>
<div class="box" style="text-align: left;">
<?php
// Im using form helper here. You can code your form by hand if you wish.
echo form::open("contact/index");
?>
<br />
<table width="100%" border="1">
	<?php if($success!=''){?>
	<tr>
		 <td width="20px;"></td>
		 <td align="center" colspan="3">
		 	<?=$success ?>
		 </td>	
	 </tr>
	 <?php } ?>
	 <tr>
		 <td width="20px;"></td>
		 <td align="right"><?php echo form::label('name', 'Your Name');?></td>
		 <td align="left" width="35%;"><?php echo form::input('name', ($form['name']));?></td>
		 <td align="left" width="30%;"><?php echo (empty ($errors['name'])) ? '' : $errors['name'];?></td>
	 </tr>
	 <tr>
		 <td width="20px;"></td>
		 <td align="right"><?php echo form::label('email', 'Your email');?></td>
		  <td align="left" width="35%;"><?php echo form::input('email', $form['email']);?></td>
		 <td align="left" width="30%;"><?php echo (empty ($errors['email'])) ? '' : $errors['email'];?></td>
	 </tr>
	 <tr>
		 <td width="20px;"></td>
		 <td align="right"> <?php echo form::label('message', 'Your Message');?></td>
		 <td align="left" width="35%;"><?php echo form::textarea('message', $form['message']);?></td>
		 <td align="left" width="30%;"><?php echo (empty ($errors['message'])) ? '' : $errors['message'];?></td>
	 </tr>
	 <?php if ( ! $captcha->promoted()) {?>	
	 <tr>
		 <td width="20px;"></td>
		 <td align="right"><?php echo form::label('captcha', 'Security code');?></td>
		 <td align="left" width="35%;"><?php echo '<p>'.$captcha->render().' '.form::input('captcha').'</p>';?></td>
		 <td align="left" width="30%;"><?php echo (empty ($errors['captcha'])) ? '' : $errors['captcha'];?></td>
	 </tr>
	 <?php }?>
	 <tr>
		 <td width="20px;"></td>
		 <td align="right"> </td>
		 <td align="left" colspan="2">
		 	<?php echo form::submit('submit', 'Send');?>
		 </td>	
	 </tr>
</table>
<?php echo form::close();?>
</div>